Learn R Programming

caracas (version 1.0.1)

[.caracas_symbol: Extract or replace parts of an object

Description

Extract or replace parts of an object

Usage

# S3 method for caracas_symbol
[(x, i, j, ..., drop = TRUE)

Arguments

x

A caracas_symbol.

i

row indices specifying elements to extract or replace

j

column indices specifying elements to extract or replace

Not used

drop

Simplify dimensions of resulting object

Examples

Run this code
# NOT RUN {
if (have_sympy()) {
  A <- matrix(c("a", 0, 0, 0, "a", "a", "a", 0, 0), 3, 3)
  B <- as_symbol(A)
  B[1:2, ]
  B[, 2]
  B[2, , drop = FALSE]
}

# }

Run the code above in your browser using DataLab